package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}

type Good struct {
	gorm.Model
	GoodNo    string `gorm:"type:varchar(50)"` //商品编码
	GoodName  string `gorm:"type:varchar(50)"` //商品名称
	GoodPrice int    `gorm:"type:int"`         //商品价格
	GoodNum   int    `gorm:"type:int"`         //商品数量
}

type Order struct {
	gorm.Model
	OrderNo   string `gorm:"type:varchar(50)"` //订单编码
	OrderName string `gorm:"type:varchar(50)"` //订单信息
	ManInfo   string `gorm:"type:varchar(50)"` //客户信息
	Gid       int    `gorm:"type:int"`
}

type GoodOrderList struct {
	OrderId   int    `gorm:"type:int"`
	GoodNo    string `gorm:"type:varchar(50)"` //商品编码
	GoodName  string `gorm:"type:varchar(50)"` //商品名称
	GoodPrice int    `gorm:"type:int"`         //商品价格
	GoodNum   int    `gorm:"type:int"`         //商品数量
	OrderNo   string `gorm:"type:varchar(50)"` //订单编码
	OrderName string `gorm:"type:varchar(50)"` //订单信息
	ManInfo   string `gorm:"type:varchar(50)"` //客户信息
}
